const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device
}
export default getters// 导入Vue包
import Vue from 'vue'
// 重置全局的样式 相当于base.css
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
// 导入element-ui第三方的组件库并设置语言包
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
// 设置全局的样式
import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'
// 导入svg精灵图
import '@/icons' // icon
// 导入权限认证
import '@/permission'
// import { imgerror, color } from '@/directives'
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
Vue.use(ElementUI)
// 定义全局的自定义指令
// Vue.directive('imgerror', imgerror)
// Vue.directive('color', color)

import * as directives from '@/directives'
Object.keys(directives).forEach(key => {
  Vue.directive(key, directives[key])
})
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
